From d38deeb5cdbb4515d13cefb2d07668173f5c59db Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 28 Apr 2004 15:23:25 +0000 Subject: [PATCH] Yet another fix for D103 Garmin's losing short waypoint names. This one verified on both the GPilotS simulator and by Gary Mumma. --- gpsbabel/Makefile | 4 ++-- gpsbabel/jeeps/gpsapp.c | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gpsbabel/Makefile b/gpsbabel/Makefile index d64a33b4d..ab03d8da0 100644 --- a/gpsbabel/Makefile +++ b/gpsbabel/Makefile @@ -78,8 +78,8 @@ dep: (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > $@ || (rm -f $@ ; exit 1)' ) >> /tmp/dep echo Edit Makefile and bring in /tmp/dep -VERSIONU=1_2_3_beta04202004 -VERSIOND=1.2.3_beta04202004 +VERSIONU=1_2_3_beta04272004 +VERSIOND=1.2.3_beta04272004 #VERSIONU=1_2_2 #VERSIOND=1.2.2 diff --git a/gpsbabel/jeeps/gpsapp.c b/gpsbabel/jeeps/gpsapp.c index 2b71196a0..0649a8e4a 100644 --- a/gpsbabel/jeeps/gpsapp.c +++ b/gpsbabel/jeeps/gpsapp.c @@ -1640,7 +1640,15 @@ static void GPS_D103_Send(UC *data, GPS_PWay way, int32 *len) p = data; - for(i=0;i<6;++i) *p++ = way->ident[i]; + for(i=0;i<6;++i) { + if (way->ident[i] == 0) { + memset(p, ' ', 6-i); + p+=6-i; + break; + } + *p++ = way->ident[i]; + } + GPS_Util_Put_Int(p,(int32)GPS_Math_Deg_To_Semi(way->lat)); p+=sizeof(int32); GPS_Util_Put_Int(p,(int32)GPS_Math_Deg_To_Semi(way->lon)); -- 2.30.2